var search = document.getElementById('search').children;
                var img = document.getElementById('img').children;
                for(var i=0;i<search.length;i++){
                    search[i].index=i;
                    search[i].onclick=function(){
                        for(var j=0;j<img.length;j++){
                            img[j].className='none';
                        }
                        for(var k=0;k<search.length;k++){
                            search[k].className='';
                        }
                        this.className="opacity";
                        var n=this.index;
                        img[n].className='block';
                    }
                }